﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security;
using System.Data;
[assembly: SecurityRules(SecurityRuleSet.Level1)]


namespace ElingOA6_Admin_DSJCJ.BLL
{
    /// <summary>
    /// 组织机构
    /// </summary>
    public class Entity
    {
        /// <summary>
        /// 组织机构DAL
        /// </summary>
        private readonly DAL.Entity dal = new DAL.Entity();
        /// <summary>
        /// 构造方法
        /// </summary>
        public Entity()
        { }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        /// <param name="fEntityNo">组织机构编号</param>
        /// <returns>组织机构信息</returns>
        public Model.Entity GetModel(string fEntityNo)
        {
            return dal.GetModel(fEntityNo);
        }
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }
        public DataSet GetAllList()
        {
            return GetList("");
        }

        /// <summary>
        ///更新系统水印文件相关信息
        /// <creator>zhongyl</creator>
        /// <date>2013-7-13</date>
        /// </summary>
        /// <param name="entityNo">组织机构编号</param>
        /// <param name="fWaterMarkContent">图片水印文件内容</param>
        /// <param name="fWaterMarkSvrFileName">图片水印文件服务器路径</param>
        /// <param name="fWaterMarkExt">图片文件文件类型</param>
        /// <param name="fWaterMarkOldFileName">图片水印文件原文件名</param>
        public void UpdateEntityWaterFile(string entityNo, byte[] fWaterMarkContent, string fWaterMarkSvrFileName,
            string fWaterMarkExt, string fWaterMarkOldFileName)
        {
            dal.UpdateEntityWaterFile(entityNo, fWaterMarkContent, fWaterMarkSvrFileName, fWaterMarkExt, fWaterMarkOldFileName);
        }

        /// <summary>
        /// 更新部分数据
        /// <creator>wangl</creator>
        /// <date>2012-12-06</date>
        /// </summary>
        /// <param name="entityNo">组织机构编号</param>
        /// <param name="entityModel">组织机构信息</param>
        public void UpdateEntity(string entityNo, Model.Entity entityModel)
        {
            dal.UpdateEntity(entityNo, entityModel);
        }
    }
}
